Extension types - add updated inference rules for num types.#3384
Open
Extension types - add updated inference rules for num types.#3384
num types.#3384Conversation
No changes intended, but the existing rules are phrased based on assumptions that are no longer true with extension types. Adds more restrictions on when the rules apply, to rule out things that previously couldn't happen.
Member
Author
|
This is a smaller, more focused, subset of my earlier PR. It makes the new rules precise and explicit. I'm writing tests to match. |
num types.num types.
It's a change, and it may require inserting a new dynamic downcast, which the current semantics does not. (We should decide whether we want this to act like real "overloading", and if so, how to resolve, or if we should just have rules that are "good enough" for most common use-cases.)
Member
|
Discussed this IRL yesterday: We will return to this later if needed. |
Member
Author
|
We will, as a minimum, need to say that the rules only apply if invoking an instance method, not an extension type method. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No changes intended, but the existing rules are phrased based on assumptions that are no longer true with extension types. Adds more restrictions on when the rules apply, to rule out things that previously couldn't happen.